using Skills;
using System.Collections.Generic;
using UnityEngine;

public class InitData : ScriptableObject
{
    public CharacterData platerInit;

    public string identifier_bag;
    public List<ItemNumPair> items;
    public List<Skill> skills;

    public SaveData_Container CreateInitItems()
    {
        List<SaveData_ItemStack> temp = new List<SaveData_ItemStack>();
        SaveData_ItemStack data;
        foreach (ItemNumPair pair in items)
        {
            data = new SaveData_ItemStack
            {
                identifier = pair.item.name,
                count = pair.num
            };
        }
        SaveData_Container ret = new SaveData_Container
        {
            itemDatas = temp,
            identifier = identifier_bag
        };
        return ret;
    }

    public List<string> CreateInitSkills()
    {
        List<string> ret = new List<string>();
        foreach (Skill skill in skills)
        {
            ret.Add(skill.name);
        }
        return ret;
    }
}
